package com.xwb.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * <p>
 * 
 * </p>
 *
 * @author 薛文博
 * @since 2021-06-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="User对象", description="")
@Entity
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    public User(String username, String password, String phone, Integer administrator) {
        this.username = username;
        this.password = password;
        this.phone = phone;
        this.administrator = administrator;
    }

    @Id
    @TableId(value = "userId", type = IdType.AUTO)
    private Integer userid;

    @TableField(fill = FieldFill.INSERT)
    private Date createtime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatetime;

    @TableField("userName")
    private String username;

    @TableField("passWord")
    private String password;

    private String phone;

    private Integer administrator;


}
